#ifndef __GLESPBuffer_H__
#define __GLESPBuffer_H__


#include "U2GLESPreRequest.h"
#include "U2GLESPixelUtil.h"


U2EG_NAMESPACE_BEGIN


/** An off-screen rendering context. These contexts are always RGBA for simplicity, speed and
    convience, but the component format is configurable.
*/
class _U2GLESShare U2GLESPBuffer
{
public:
    U2GLESPBuffer(PixelComponentType format, size_t width, size_t height);
    virtual ~U2GLESPBuffer();

    PixelComponentType getFormat() { return mFormat; }
    size_t getWidth() { return mWidth; }
    size_t getHeight() { return mHeight; }

    /** Get PBuffer component format for an OGRE pixel format.
     */
    static PixelComponentType getPixelComponentType(PixelFormat fmt);

protected:
    PixelComponentType  mFormat;
    size_t              mWidth;
    size_t              mHeight;
};


U2EG_NAMESPACE_END


#endif
